<#include "../public/header.html">
    <div id="p" class="easyui-panel" title="学生信息" style="width:100%;height:100%">
        <form id="student_form" style="padding: 0 10%" >
            <input type="hidden" id="id" name="id"/>
            <table class="tableForm tableCss" style="border: 0;">
                <tr>
                    <td colspan="3" style="text-align: center;">
                        <input class="easyui-searchbox" id="s_cid" data-options="prompt:'输入身份证',searcher:doSearch" style="width:400px"/>
                    </td>
                    <td><a href="javascript:doPrint()" class="easyui-linkbutton"  data-options="iconCls:'icon-print'" style="width:80px">打印</a></td>
                </tr>

            </table>
            <div id="page1">
                <div style="width:100%;font-size: 38px;text-align: center;">学生信息表</div>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tab student_info">
                <tr>
                    <th>姓名</th>
                    <td style="width: 220px;"><span id="student_name"></span>&nbsp;</td>
                    <th>户口性质</th>
                    <td><span id="student_hk_type_name"></span>&nbsp;</td>
                    <td rowspan="10" style="width: 120px;"><img id="id_card_pic" src="" style="width: 130px;height: 160px;"></td>
                    <td rowspan="10"  style="width: 120px;"><img id="student_pic" src="" style="width: 130px;height: 160px;"></td>
                </tr>
                <tr>
                    <th>身份证号码</th>
                    <td><span id="student_id_cart"></span>&nbsp;</td>
                    <th>户藉所在地</th>
                    <td><span id="student_hj_address_name"></span>&nbsp;</td>
                </tr>
                <tr>
                    <th>社保卡号码</th>
                    <td><span id="student_sb_cart"></span>&nbsp;</td>
                    <th>民族</th>
                    <td><span id="student_nationality_name"></span>&nbsp;</td>
                </tr>
                <tr>
                    <th>出生年月</th>
                    <td><span id="student_birthday"></span>&nbsp;</td>
                    <th>政治面貌</th>
                    <td><span id="student_political_name"></span>&nbsp;</td>
                </tr>
                <tr>
                    <th>性别</th>
                    <td><span id="student_sex_name"></span>&nbsp;</td>
                    <th>文化程度</th>
                    <td><span id="student_cultural_name"></span>&nbsp;</td>
                </tr>
                <tr>
                    <th>单位</th>
                    <td><span id="at_company"></span>&nbsp;</td>
                    <th>婚姻状况</th>
                    <td><span id="student_is_marray_name"></span>&nbsp;</td>
                </tr>
                <tr>
                    <th>二级组织</th>
                    <td><span id="dep_name"></span>&nbsp;</td>
                    <th>人员类别</th>
                    <td><span id="student_type_name"></span>&nbsp;</td>
                </tr>
                <tr>
                    <th>班级</th>
                    <td><span id="class_name"></span>&nbsp;</td>
                    <th>联系地址</th>
                    <td><span id="student_address"></span>&nbsp;</td>
                </tr>
                <tr>
                    <th>专业技术级别</th>
                    <td><span id="student_duty_rank"></span>&nbsp;</td>
                    <th>联系电话</th>
                    <td><span id="student_tel_phone"></span>&nbsp;</td>
                </tr>
                <tr>
                    <th>职称</th>
                    <td><span id="student_title"></span>&nbsp;</td>
                    <th>电子邮箱</th>
                    <td><span id="student_email"></span>&nbsp;</td>
                </tr>
                <tr>
                    <th>职务</th>
                    <td><span id="student_duty"></span>&nbsp;</td>
                    <th>职业年限</th>
                    <td><span id="student_age_limit"></span>&nbsp;</td>
                    <td>身份证相片</td>
                    <td>现场摄像</td>
                </tr>
            </table>

                <div id="project_class_id">

                </div>
            </div>
        </form>
    </div>
    <style>
        .student_info th{
            text-align: left;
            width: 100px;
            padding: 2px 5px;
        }
        .student_info td{
            padding: 2px 5px;
        }
    </style>
    <script>
        var base_path = "${root!}";
        function doSearch(value){
            $.ajax({
                type:"post",
                url:"admin/student/load_student_info",
                data:{id_card:value},
                dataType:"json",
                success:function(data){

                    if(data.state==1){
                        $("#student_name").html(data.obj.student_name);
                        $("#student_hk_type_name").html(data.obj.student_hk_type_name);
                        $("#id_card_pic").attr("src",base_path+data.obj.id_card_pic);
                        $("#student_pic").attr("src",base_path+data.obj.student_pic);
                        $("#student_id_cart").html(data.obj.student_id_cart);
                        $("#student_hj_address_name").html(data.obj.student_hj_address_name);
                        $("#student_sb_cart").html(data.obj.student_sb_cart);
                        $("#student_nationality_name").html(data.obj.student_nationality_name);
                        $("#student_birthday").html(data.obj.student_birthday);
                        $("#student_political_name").html(data.obj.student_political_name);
                        $("#student_sex_name").html(data.obj.student_sex_name);
                        $("#student_cultural_name").html(data.obj.student_cultural_name);
                        $("#at_company").html(data.obj.at_company);
                        $("#student_is_marray_name").html(data.obj.student_is_marray_name);
                        $("#dep_name").html(data.obj.dep_name);
                        $("#student_type_name").html(data.obj.student_type_name);
                        $("#class_name").html(data.obj.class_name);
                        $("#student_address").html(data.obj.student_address);
                        $("#student_duty_rank").html(data.obj.student_duty_rank);
                        $("#student_tel_phone").html(data.obj.student_tel_phone);
                        $("#student_title").html(data.obj.student_title);
                        $("#student_email").html(data.obj.student_email);
                        $("#student_duty").html(data.obj.student_duty);
                        $("#student_age_limit").html(data.obj.student_age_limit);

                        $("#project_class_id").html("");
                        var str = '<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tab student_info">' +
                                '                                <tr ><td colspan="6">考证信息</td></tr>' +
                                '                        <tr >' +
                                '                        <th style="text-align: center;">项目</th>' +
                                '                        <th style="text-align: center;">级别</th>' +
                                '                        <th style="text-align: center;">详情</th>' +
                                '                        <th style="text-align: center;">成绩</th>' +
                                '                        <th style="text-align: center;">证书</th>' +
                                '                        <th style="text-align: center;">备注</th>' +
                                '                        </tr>';
                        $.each(data.tokenid,function(i,item){
                            var det = "";
                            if(item.project_testing_address!=""){
                                det +=" 地点："+item.project_testing_address;
                            }
                            if(item.project_testing_room){
                                det +=" 试室："+item.project_testing_address;
                            }
                            if(item.project_testing_seat){
                                det +=" 座位号："+item.project_testing_seat;
                            }
                            if(item.project_testing_time){
                                det +=" 时间："+item.project_testing_time;
                            }
                            if(item.project_theory_testing_address){
                                det +=" 理论地点："+item.project_theory_testing_address;
                            }
                            if(item.project_theory_testing_room){
                                det +=" 理论试室："+item.project_theory_testing_room;
                            }
                            if(item.project_theory_testing_seat){
                                det +=" 理论座位号："+item.project_theory_testing_seat;
                            }
                            if(item.project_theory_testing_time){
                                det +=" 理论时间："+item.project_theory_testing_time;
                            }
                            if(item.project_reality_testing_address){
                                det +=" 实操地点："+item.project_reality_testing_address;
                            }
                            if(item.project_reality_testing_seat){
                                det +=" 实操座位号："+item.project_reality_testing_seat;
                            }
                            if(item.project_reality_testing_time){
                                det +=" 实操时间："+item.project_reality_testing_time;
                            }
                            var res = ""
                            if(item.project_reality_result){
                                res +=" 实操成绩："+item.project_reality_result;
                            }
                            if(item.project_theory_result){
                                res +=" 理论成绩："+item.project_theory_result;
                            }
                            if(item.project_synthesis_result){
                                res +=" 综合评定："+item.project_synthesis_result;
                            }
                            str +='<tr><td>'+item.project_name+'</td><td>'+item.project_rank_name+'</td><td>'+det+'</td><td>'+res+'</td><td>'+item.project_card_code+'</td><td>&nbsp;</td></tr>'
                        });
                        str +='            </table>';
                        $("#project_class_id").html(str);

                    }else{
                        $.messager.show({
                            title:'提醒',
                            msg:data.msg,
                            showType:'fade',
                            style:{
                                right:'',
                                bottom:''
                            }
                        });
                    }
                }
            })
        }
    </script>

    <!-- 插入打印控件 -->
    <OBJECT  ID="jatoolsPrinter" CLASSID="CLSID:B43D3361-D075-4BE2-87FE-057188254255"
             codebase="jatoolsPrinter.cab#version=8,6,0,0"></OBJECT>
    <script>
        function doPrint() {
            myDoc = {
                settings:{
                    paperName:'a4',
                    orientation:2,
                    topMargin:100,
                    leftMargin:100,
                    bottomMargin:100,
                    rightMargin:100
                },
                documents: document,
                /*
                 要打印的div 对象在本文档中，控件将从本文档中的 id 为 'page1' 的div对象，
                 作为首页打印id 为'page2'的作为第二页打印            */
                copyrights: '杰创软件拥有版权  www.jatools.com' // 版权声明,必须
            };
            jatoolsPrinter.printPreview(myDoc);
        }
    </script>
    <#include "../public/footer.html">